package com.adingxiong.cft.entity;

import com.adingxiong.cft.annotate.StrCut;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * @Id  对象文本的id    @Index  标识需要检测的字段
 * </p>
 *
 * @author xiongc
 * @since 2020-09-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="SysLog对象", description="")
@Document
public class MgSysLog implements Serializable {

    private static final long serialVersionUID=1L;

    @Id
    @TableId(value = "id", type = IdType.AUTO)
    private String id;

    @Indexed
    @ApiModelProperty(value = "操作")
    private String operation;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "方法名")
    private String methodName;

    @ApiModelProperty(value = "参数")
    private String paramName;

    @ApiModelProperty(value = "ip地址")
    private String ip;
    @Indexed
    @ApiModelProperty(value = "用户名")
    private String username;


}
